<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="ui/system/login/skin/style.css" rel="stylesheet" type="text/css" id="skin"/>
<script type="text/javascript" src="ui/js/jquery.js"></script>
<script type="text/javascript" src="ui/js/login.js"></script>

<!--居中显示start-->
<script type="text/javascript" src="ui/js/method/center-plugin.js"></script>
<!--居中显示end-->

<!--修正IE6支持透明png图片start-->
<script type="text/javascript" src="ui/js/method/pngFix/supersleight.js"></script>
<!--修正IE6支持透明png图片end-->
<title>管理员登录</title>
<style>
/*提示信息*/	
#cursorMessageDiv {
	position: absolute;
	z-index: 99999;
	border: solid 1px #cc9933;
	background: #ffffcc;
	padding: 2px;
	margin: 0px;
	display: none;
	line-height:150%;
}
/*提示信息*/
</style>

<script type="text/javascript">
	$(function(){
		$("#username").blur(function(){
			if(!$(this).val()){
				$(".login_info").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户名不能为空！");
			}
			else{
				$(".login_info").html("");
			}
		});
		$("#password").blur(function(){
			if(!$(this).val()){
				$(".login_info").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;密码不能为空！");
			}
			else{
				$(".login_info").html("");
			}
		});
	});
</script>
</head>
<body>
    	<div class="login_main">
		<div class="login_top2">
		</div>
		<div class="login_middle">
			<div class="login_middleleft"></div>
			<div class="login_middlecenter">
			<form id="loginForm" action="<%=path%>/commonLogin.action" class="login_form" method="post">
					<div class="login_user"><input type="text" id="username" name="adminLogin.arg0"></div>
					<div class="login_pass"><input type="password" id="password" name="adminLogin.arg1"></div>
					<div class="clear"></div>
					<div class="login_button">
						<div class="login_button_left"><input type="submit"  id="login" value=""/></div>
						<div class="login_button_right"><input type="reset" value=""/></div>
						<div class="clear"></div>
					</div>
			</form>
					<div class="login_info" >
						<s:set name="flag" value="#flag"></s:set>
						<s:if test="flag==1">
							<script type="text/javascript">$(".login_info").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户名或密码错误请重新登录！");</script>
						</s:if>
						<s:set name="isEnable" value="#isEnable"></s:set>
						<s:if test="isEnable==2">
							<script type="text/javascript">$(".login_info").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户未激活！");</script>
						</s:if>
					</div>
			</div>
			<div class="login_middleright"></div>
			<div class="clear"></div>
		</div>
		<div class="login_bottom">
			<div class="login_copyright"></div>
		</div>
	</div>
	<!--
	<script>
		$(function(){
			//居中
			
			 $('.login_main').center();
			 document.getElementById("username").focus();
			 $("#username").keydown(function(event){
			 	if(event.keyCode==13){
					login();
				}
			 });
			 $("#password").keydown(function(event){
			 	if(event.keyCode==13){
					login();
				}
			 });
			 
		});
		//登录
		function login() {
		var errorMsg = "";
		var loginName = document.getElementById("username");
		var password = document.getElementById("password");
		if(!loginName.value){
			errorMsg += "&nbsp;&nbsp;用户名不能为空!";
		}
		if(!password.value){
			errorMsg += "&nbsp;&nbsp;密码不能为空!";
		}

		if(errorMsg != ""){
			$(".login_info").html(errorMsg);
			$(".login_info").show();
		}
		else{
			$(".login_info").html("&nbsp;&nbsp;登录成功，正在转到主页...");
			window.location="../../system/layout/main.html";  
		}
	}
	</script>
	  -->
</body>
</html>